home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 29 / CDT29.iso / e-Mail / WorldClient Pro 2.2.3 / wcsetup.exe / WEBHELP.ZIP / hhapplet / IndexPane$MyThread.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-10-21  |  2.1 KB  |  109 lines

  1. package hhapplet;
  2.  
  3. class IndexPane$MyThread extends Thread {
  4.    int m_bResearch;
  5.    // $FF: synthetic field
  6.    final IndexPane this$0;
  7.  
  8.    IndexPane$MyThread(IndexPane var1) {
  9.       (this.this$0 = var1).getClass();
  10.       this.m_bResearch = 1;
  11.    }
  12.  
  13.    public void run() {
  14.       while(true) {
  15.          if (this.m_bResearch <= 0) {
  16.             try {
  17.                Thread.sleep(100L);
  18.             } catch (InterruptedException var8) {
  19.             }
  20.          } else {
  21.             String var1 = this.this$0.m_tfEdit.getText().toUpperCase();
  22.             int var2 = var1.length();
  23.             if (var2 > 0) {
  24.                if (this.this$0.m_bUseForAppleList) {
  25.                   int var3 = 0;
  26.                   int var4 = this.this$0.FindBaseKeywordForAppleList(this.this$0.m_forapplelist.countItems() - 1, -1);
  27.  
  28.                   int var5;
  29.                   for(var5 = this.this$0.FindBaseKeywordForAppleList((this.this$0.m_forapplelist.countItems() - 1) / 2, -1); var3 < var4; var5 = this.this$0.FindBaseKeywordForAppleList((var3 + var4) / 2, -1)) {
  30.                      String var6 = this.this$0.m_forapplelist.getItem(var5).toUpperCase();
  31.                      int var7 = var6.compareTo(var1);
  32.                      if (var7 > 0) {
  33.                         var4 = var5;
  34.                      } else if (var7 < 0) {
  35.                         var3 = this.this$0.FindBaseKeywordForAppleList(var5 + 1, 1);
  36.                      } else {
  37.                         var3 = var5;
  38.                         var4 = var5;
  39.                      }
  40.                   }
  41.  
  42.                   this.this$0.m_forapplelist.getItem(var5).toUpperCase();
  43.                   if (var5 > this.this$0.m_forapplelist.countItems() - 1) {
  44.                      var5 = this.this$0.m_forapplelist.countItems() - 1;
  45.                   }
  46.  
  47.                   if (var5 < 0) {
  48.                      var5 = 0;
  49.                   }
  50.  
  51.                   if (var5 > 0) {
  52.                      this.this$0.m_forapplelist.setTopIndex(var5 - 1);
  53.                   } else {
  54.                      this.this$0.m_forapplelist.setTopIndex(var5);
  55.                   }
  56.  
  57.                   this.this$0.m_forapplelist.select(var5);
  58.                   this.this$0.m_nSelectedIndex = var5;
  59.                   this.this$0.m_applet.showStatus(this.this$0.m_forapplelist.getSelectedItem());
  60.                } else {
  61.                   int var9 = 0;
  62.                   int var10 = this.this$0.FindBaseKeyword(this.this$0.m_list.countItems() - 1, -1);
  63.  
  64.                   int var11;
  65.                   for(var11 = this.this$0.FindBaseKeyword((this.this$0.m_list.countItems() - 1) / 2, -1); var9 < var10; var11 = this.this$0.FindBaseKeyword((var9 + var10) / 2, -1)) {
  66.                      String var12 = this.this$0.m_list.getItem(var11).toUpperCase();
  67.                      int var13 = var12.compareTo(var1);
  68.                      if (var13 > 0) {
  69.                         var10 = var11;
  70.                      } else if (var13 < 0) {
  71.                         var9 = this.this$0.FindBaseKeyword(var11 + 1, 1);
  72.                      } else {
  73.                         var9 = var11;
  74.                         var10 = var11;
  75.                      }
  76.                   }
  77.  
  78.                   this.this$0.m_list.getItem(var11).toUpperCase();
  79.                   if (var11 > this.this$0.m_list.countItems() - 1) {
  80.                      var11 = this.this$0.m_list.countItems() - 1;
  81.                   }
  82.  
  83.                   if (var11 < 0) {
  84.                      var11 = 0;
  85.                   }
  86.  
  87.                   if (var11 != this.this$0.m_nSelectedIndex) {
  88.                      this.this$0.m_list.makeVisible(this.this$0.m_list.countItems() - 1);
  89.                      if (var11 > 0) {
  90.                         this.this$0.m_list.makeVisible(var11 - 1);
  91.                      } else {
  92.                         this.this$0.m_list.makeVisible(var11);
  93.                      }
  94.  
  95.                      this.this$0.m_list.getVisibleIndex();
  96.                      this.this$0.m_list.select(var11);
  97.                      this.this$0.m_nSelectedIndex = var11;
  98.                   }
  99.  
  100.                   this.this$0.m_applet.showStatus(this.this$0.m_list.getSelectedItem());
  101.                }
  102.             }
  103.  
  104.             this.m_bResearch += -1;
  105.          }
  106.       }
  107.    }
  108. }
  109.